package cn.nit.blog.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author wjx
 * @since 2023-03-24
 */
@TableName("t_discuss_post")
@Data
public class Post implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 发帖人
     */
    private Integer userId;

    /**
     * 标题
     */
    private String title;

    /**
     * n内容
     */
    private String content;

    /**
     * 0-普通; 1-置顶;
     */
    private Integer type;

    /**
     * 0-正常; 1-精华; 2-拉黑;
     */
    private Integer status;

    /**
     * 发帖时间
     */
    private Date createTime;

    @TableField(exist = false)
    private String createTimeStr;

    /**
     * 评论的数量
     */
    private Integer commentCount;

    /**
     * 帖子分数
     */
    private Double score;

    @TableField(exist = false)
    private Long likeCount;

}
